package com.ps.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ps.dto.MedicinePageQueryDTO;
import com.ps.entity.Medicine;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;


@Mapper
public interface MedicineMapper  extends BaseMapper<Medicine> {
    @Select("select a.* from medicine a left join " +
            "setmeal_medicine b on a.id = b.medicine_id where b.setmeal_id = #{setmealId}")
    List<Medicine> getBySetmealId(Long setmealId);

    com.github.pagehelper.Page<Medicine> medicinepageQuery(MedicinePageQueryDTO medicinePageQueryDTO);
}
